package net.rlair.sbdemo.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Aspect
@Component
@Order(1)
public class Lixudong1 {
    @Pointcut("execution(* net.rlair.sbdemo.controller.ZhaozichenController.list(..))")
    public void manyAspects() {
    }

    @AfterReturning("manyAspects()")
    public void afterRetuning() {
        System.out.println("AfterRetuning");
    }

    @Around("manyAspects()")
    public Object around(final ProceedingJoinPoint joinPoint) throws Throwable {
        System.out.println("around begin");
        final Object o = joinPoint.proceed();
        System.out.println("around end");
        return o;

    }
}
